Is it possible that the "door" variable is not setting itself to 23? If you pull up the debug menu while playtesting (F8), it should show you what that variable's value is.
A nicer way of using items is setting up a "select key item" event (assuming your key is a "key" type item). It will store the variable of the key item you select, and you can run a condition to check if the player has selected the item ID of the key. I'm not sure if this is what you wanted, though.
(Unless you already set up "select key item" in another event and are checking for it as a common event?)