FORM OF AMENDED AND RESTATED SECURITY AND INTERCREDITOR AGREEMENT