Sharapova exits while Murray survives thriller