A Middlesbrough security guard who got mixed up in rioting when he attempted to help his cousin flee police has been jailed.