Put it between the setup and the payoff, letting it close one scene before the next one begins. For a bigger contrast, follow it with Law & Order Dun Dun when the joke turns into a mock-serious reveal, or lead into it from Cartoon Chase Music when a frantic sequence needs a clear scene change.