Shawn Mendes was stuck on a broken-down train a few hours before his London gig