A Swindon man has been jailed for five years after he was arrested with £52,000 of drugs.