Andy Murray became the 46th man to reach 500 ATP tour wins when he beat Kevin Anderson to set up a quarter-final clash with Dominic Thiem in Miami.