Winning Mega Millions ticket worth $31M sold at Massachusetts grocery store