A.C.
Two things: I think it was right to stand your ground. He didn't do it in 3 minutes so he doesn't get the reward.
BUT, my son, nearly 4, cannot yet understand this sort of forward thinking. I used to do things like you did, too, but I realized that he needs the reward (or lack of reward) to happen right away. He doesn't understand "You didn't do this something half an hour ago, so you don't get this now," even when I state it in advance. At the very least, he needed to know as soon as the 3 minutes are over that he lost his Lucky Charms. My son doesn't yet have the ability to think into the future (and thus into the past) about rewards, and he would absolutely react the way your son did because he genuinely wouldn't understand that something he hadn't done earlier caused him to lose the reward. This is something that will come with maturity, that kids do develop eventually, and only you know if your son already has this ability or not. But it is something to consider, when you are making promises that may be too far in the future for him to currently process.
ETA: Since you promised him Lucky Charms in the parking lot, probably out of desperation, bring them when you pick him up from school. This is the future/past thinking thing above - if your son has not yet developed the skill-set to understand a future loss of rewards, it will just be you breaking your promise. He won't be able to connect it to his earlier misbehavior.
I've totally been in the frustrated place that you are in now. Good luck!