AMENDED AND RESTATED COMMON STOCK PURCHASE AGREEMENT