when incoming mqqt sensor value is received save the payload to context store. Then use inject node or another timer node to retrieve context stored value at 02:00 and check if open.
e.g.
[{"id":"32730060.fd6438","type":"inject","z":"5a245aa1.510164","name":"simulate mqtt node input closed","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"closed","payloadType":"str","x":280,"y":2680,"wires":[["f06bb65c.dd7ea"]]},{"id":"f06bb65c.dd7ea","type":"change","z":"5a245aa1.510164","name":"","rules":[{"t":"set","p":"sensor_blah","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":2700,"wires":[[]]},{"id":"5d9398b6.afb928","type":"inject","z":"5a245aa1.510164","name":"simulate mqtt node input open","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"open","payloadType":"str","x":270,"y":2720,"wires":[["f06bb65c.dd7ea"]]},{"id":"74d2aa8d.c95f6c","type":"inject","z":"5a245aa1.510164","name":"at 02:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":2600,"wires":[["e161fa25.fbe788"]]},{"id":"e161fa25.fbe788","type":"switch","z":"5a245aa1.510164","name":"","property":"sensor_blah","propertyType":"flow","rules":[{"t":"eq","v":"open","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":2600,"wires":[["43216397.c9cc14"]]},{"id":"43216397.c9cc14","type":"debug","z":"5a245aa1.510164","name":"do something","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":600,"y":2600,"wires":[]}]