AMENDED AND RESTATED SECURED PROMISSORY NOTE Secured by Security Agreement