I believe that Tim got fired in his teens, and the flashback is just from few years before the events of "The New Jerry".
Since it's shown that Jerry recruits spies at early ages, and it's believed that Tim was orphaned as a child. So it's Jerry could have recruited Tim when he lost his parents, and possibly also because he was a genius as a child, but without any parental guidance he started doing bad things and creating stuff that wasn't approved by WHOOP - so they had to fire him (20 years before the episode).
After that he continued to do criminal things - since his criminal record is longer than Clover's list of ex-boyfriends - and managed to never get caught for years. But eventually WHOOP caught him just a few years before that episode, which is the flashback - because we only see him getting arrested, not fired.
So it's possibly that he's in his mid-twenties or early thirties in the present.
Well, that's just my theory! :D