Cooked foods only keep for so long - a kitchen will report a meal as saying fresh for another N days/hours.
One hour before the food spoils, the kitchen displays a message that "The food looks a bit iffy and has an odd smell". If eaten during this time, there is a chance (50/50?) of getting a normal effect and a chance of getting a "the food makes you sick" message with random all-negative stats.
Spoiled food cannot be eaten, saying "Yuck! it's spoiled".
Initially, food would keep fresh for two days. You can now add salt to a meal in any quantity and gain two extra days of freshness (no matter how much you add, you only get two extra days). Also, the first seven Pyramid of Renewal increase the time a meal stays fresh - the first one doubled the base time (so a meal without salt that would've been two days became four days and a meal with salt that would have been four days became six days).
No evidence has been found that freshness affects stats or duration of a meal at all.