It is pretty simple. Just make a global variable named "key" and make it a bolean. Then you can do something like this
player collision with "key" set variable key to true and destroy key
system | compare variable | key is true? ----> Open door
IF you just want to compare the variable at a given time and not every tick you can set up a trigger. For example.
Player collision with door | compare variable | is "key" true? | If true, open door