Two keys, and neither fits anything ordinary
The blue key in the second half is not the blue key in the first. That is either the clue or the joke. Lynch's own clues decline to say which.

01 The key that appears before anyone knows what it opens
A blue key appears in the second half of Mulholland Drive when a hitman produces it at Winkies diner. It is small, unusual in shape, a particular shade of cobalt. It is clearly significant. Nobody explains it.
The same key, or something visually identical to it, turns up in the first half in Betty and Rita's apartment, beside the blue box it is meant to open. Rita produces it from her purse; she has apparently had it all along, left over from whatever happened to her on Mulholland Drive the night the film begins. Together, the box and the key feel like the film's formal promise: here is the lock, here is what opens it. Rita puts the key in. The box opens. Both women are gone.

02 The key that does not follow
What David Lynch told the press about the film's structure at Cannes in 2001 was characteristically limited. The ten clues he later printed on the DVD insert name the box and the key — one asks who gives a key, and why — but decline to say what they mean. The clues are a reading list, not a solution.

The problem is a small, material one. The hitman's key and Rita's key are handled by the film as though they are the same object, but their lines of possession do not connect. Nothing in the first half puts that key into Rita's bag. Critics writing on the film have noted this since its release: Todd McGowan, in The Impossible David Lynch (2007), for one, treats the discontinuity as structural rather than accidental — the two halves of the film do not obey the same rules of cause and effect, which is part of what the second half is doing to the first.
If the first half is a dream — a reading many critics adopt, while acknowledging its costs — then the key's logic is dream logic: the object exists because it needs to exist, and where it came from is the wrong question. If the film is something more mechanistic, a story of wish-fulfillment warping into fact, then the key is the seam showing. Either way, it is not a prop that rewards the search for a naturalistic explanation.
Angelo Badalamenti's score drops away almost entirely in the scenes where the box and key appear. What the film offers instead is silence and then a very loud sound. The key turns and the mechanism opens. The question the first half spent ninety minutes building is answered by being removed.