Ollie Pope completed a 34-ball fifty for Surrey, one ball before sealing his side's five-wicket victory over Middlesex in the Vitality Blast.