AMENDED AND RESTATED SECURED CONVERTIBLE PROMISSORY NOTE