A gang of masked men have been jailed for more than 50 years after they were caught less than an hour after fleeing the scene of a robbery.