The glitch just happened to me, and I wasn't even trying for it.
I hit the "level up" and was presented with the three boxes.
I chose the box with one donut and then spent $100,000 to get the three.
After I collected the three donuts, I went to the friends screen so I could synchronize my game and not lose the 3 donuts I just shelled out $100,000 to get.
When I went back to my town, the level up chime sounded again and I got the three boxes choice once more.
It was here the glitch occurred because I kept hitting "collect" (not wanting to spend more money being so close to getting the escalator), but the three boxes wouldn't go away.
I guess I ended up with about 90 or so donuts when it was all over, but my XP meter is now a shambles.
While the donuts were a surprise, I hope the XP meter gets fixed. There's no way to cover the required XP to level up again anytime soon.