EXHIBIT 10.40 AMENDED AND RESTATED RECEIVABLES PURCHASE AGREEMENT