Key Door

Key Doors (also known as Locked Doors) are doors the player cannot enter unless they have collected a key. Locked doors usually have the appearance of a regular Warp Door with a keyhole.

Super Mario Bros. 2
Key Doors make their debut in Super Mario Bros. 2. They can only be opened by Keys. If the player picks up a key for a Key Door, a Phanto will chase the player.

Super Mario 64 / Super Mario 64 DS
Keys in Super Mario 64 are used to open Key Doors that lead to new courses, and in the DS remake, Key Doors that hold Mario, Luigi, Wario and a secret Power Star.

Super Mario Advance 4: Super Mario Bros. 3
While Key Doors do not appear in Super Mario Bros. 3, one can be found in the Game Boy Advance remake Super Mario Advance 4: Super Mario Bros. 3, in the World-e-exclusive level Doors o' Plenty.

Super Mario Galaxy
Key Doors appear in the Ghostly Galaxy in Super Mario Galaxy, where they automatically open as soon as Mario or Luigi obtains a key. In the case of the "Matter Splatter Mansion" mission, multiple Key Doors can be unlocked at once with one key.

Super Mario Maker / Super Mario Maker for Nintendo 3DS
Key Doors were introduced in Super Mario Maker in the version 1.40 update, and available at the start in Super Mario Maker for Nintendo 3DS. They can be produced by shaking a P Warp Door (which in turn is created by shaking a Warp Door).

Super Mario Run
Key Doors appear in Super Mario Run in the level Boohind Lock and Key, where they can only be opened with keys. Once entered, Key Doors cannot be entered again. Key Doors resemble Ghost House doors from New Super Mario Bros. U, but with a keyhole in the center.

Captain Toad: Treasure Tracker
Key Doors appear again in Captain Toad: Treasure Tracker, behaving like in previous Mario games.

Trivia

 * In the original Super Mario Bros. 2, once a Key Door is unlocked, it disappears. In the remakes, only the keyhole disappears by transforming them into normal swing-open Warp Doors.
 * In the Super Mario Mash-Up Pack in Minecraft, there is a painting of Key Doors from Super Mario 64.