It is possible, but it is no as intuitive as I hoped it was.
If you take the key, then you’ll open the door and walk into lava. In order to complete it you need to avoid the key at the start.
Oooooh that makes sense... somehow it didn't cross my mind that not picking it up would stop me from dying.