I would never leave them in the car not even 5 mins. Maybe it was his way of rebeling against you doing it again?
Poor baby, maybe next time walk him before you leave him in there, but I would suggest you never do it again. Around here you get a ticket