AMENDED AND RESTATED SECURITY AGREEMENT, PLEDGE AND INDENTURE OF TRUST Dated as of June 30, 1997