Defending champion Novak Djokovic survived a scare from Alexandr Dolgopolov on Tuesday to reach the Miami Open quarter-finals while Andy Murray won the 500th match of his career to reach the last eight.