FIRST AMENDMENT AND RESTATEMENT OF CONVERTIBLE PROMISSORY NOTE PURCHASE AGREEMENT