Score is the main factor in what determines your top play on a song if you're using the same mod combinations multiple times, so because the 40pp play has a higher score despite a lower accuracy, your 60pp score won't overwrite it because the score is lower. You either have to do the play again with a better score or try different mod combinations.