Murray became the ninth active male player to win 500 matches when he beat Kevin Anderson, 6-4, 3-6, 6-3, in the fourth round of the Miami Open.