When the festival ends and your pie buff runs out. If you use the pie right before, you can keep the buff going until it runs out even though the festival is over.
However, the anniversary event is coming soon after, which also has a exp buff.
Fun fact: You can eat it right before the festival ends and log out of a toon and the buff will still have its remaining duration when you log back in.
Edit: it's good to do this for every toon before the fest ends so you can have that exp boost in the future. I logged onto an alt a few months ago that'd I'd been leveling during the fest the previous year, and it still had the pie exp buff active.