BOSTON ( AP ) - Wal-Mart Stores Inc. has agreed to pay $ 40 million to 87,500 Massachusetts employees who claimed the retailer denied them rest and meals breaks , manipulated time cards and refused to pay overtime .