SECOND AMENDED AND RESTATED IRREVOCABLE STANDBY STOCK PURCHASE AGREEMENT