AMENDMENT NO. 2 TO AMENDMENT NO. 1 TO AMENDED AND RESTATED SECURITY AGREEMENT