MGM Resorts has agreed to pay $45 million in a lawsuit regarding two data breaches.