24 Minutes is the twenty-first episode of Season 18. It aired as part of the one hour season finale, alongside the episode "You Kent Always Say What You Want". It was originally promoted as being the 400th episode, but aired as the 399th. It is an obvious parody of the TV series, 24, and even contains Jack Bauer and Chloe O'Brian from the TV as guest stars on this episode.
An expired and highly pungent container of yogurt at the Springfield Nuclear Power Plant is found to belong to Homer, who is ordered to dispose of it by Mr. Burns. After failing to persuade Apu to take it, the yogurt falls into the hands of the bullies. Homer then unwittingly uncovers Milhouse spying on the bullies, causing the bullies to throw them both in a dumpster.
Meanwhile, Marge forgets about the bake sale, and only has half an hour to make a raisin sponge cake. She finds out that she hasn't got any raisins, forcing her to drive to the shop. But there's only one box of raisins and to get it, Marge has to fight with Helen Lovejoy, ending up knocking her down (Helen is injured badly enough to have to go to hospital). Marge gets the raisins and buys them. Back at home, Marge starts baking. In order to save time, Marge drastically increases the oven temperature to 1,200 degrees, burning the cake and making it rock-solid. Marge attempts to cover it up with pink and white frosting before leaving for the bake sale. She accidentally drops the cake when getting out of the car (which makes it fall onto the car hood, denting it, and eventually the ground). She cannot repair it, so she just pats a bit of the icing flatter. Not surprisingly, no one tries to eat any of the cake at the bake sale.
At Jimbo's house, the three bullies make a powerful stink bomb from the expired yogurt (referred as TCBY) (along with other ingredients such as roadkill, burnt hair, Jimbo's sister's retainer case, six weeks of bottled farts, possum placenta and sweat from a walk-around Goofy-suit), and plan on detonating it at the bake sale. After Milhouse's failed attempt to track the bullies, Lisa suggests that Bart help them, which he does after negotiating immunity from punishment for all his past and future pranks. Bart breaks in to Jimbo's house but can't find the roller coaster room. During his investigation, Bart's phone call is accidentally crossed with a call from Jack Bauer of 24 and turns it into a prank call against him. After finding out about the stink bomb, Bart returns to the school to tell Lisa, but is knocked out by Martin, who turned out to be the bullies' mole.
At the bake sale, the bullies start the three-minute timer for the bomb. Bart, locked in the ventilation room, wakes up and contacts Lisa by his cell phone and shows her a picture of the stink bomb, telling her to have Principal Skinner dump the hot dog water and short circuit the ventilation fan. Skinner fills up the room with the water. Running out of air, Bart attempts to swim out, but cannot break through the room's only window. Chief Wiggum tries to shoot through the glass (accidentally aiming at Bart's face each time), but the glass is bulletproof. Marge helps him, breaking the glass by throwing her burnt and incredibly solid cake through the window. Lisa then defuses the bomb (which turns out to have a rather simplistic off switch), saving the bake sale from the stench. However after that, Jack Bauer & several CTU field agents break inside the bake sale, destroying it, and start to arrest Bart for his "annoying prank call". A nuclear bomb then goes off in the distance, but everyone sighs with relief after Bauer reassures them that the nuclear bomb went off in Shelbyville.
An original idea saw Edgar Stiles from 24 appearing in the episode and being killed, but the concept was dropped. Lisa told Bart that Jimbo drew a picture when he was a kid, and got a frowny face from the teacher.