What happens if you run out of time?

While I didn't tested this, I think that it will lead to dying and restarting the level. There are few more ways to die on those levels, including running into enemies and falling into lava (on last level).

But there must be a joke or something in there.

Well, Bowser will say random reply ("Ready to roll!", etc.) each time you restart at level start screen. There are few of them and I find them pretty hilarious.

UPD: I checked this out, turned out I was 100% correct.