break the bottom part into a separate piece where you listen for both sensors to be off and then turn the light off.
[{"id":"5c43ad0278304f6d","type":"trigger-state","z":"c89d915bdff0f798","name":"","server":"","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":["sensor.motion","sensor.contact"],"entityidfiltertype":"list","debugenabled":false,"constraints":[{"targetType":"entity_id","targetValue":"sensor.moiton","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"},{"targetType":"entity_id","targetValue":"sensor.contact","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"}],"inputs":0,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":false,"x":256,"y":2064,"wires":[["a3ba3c562ac113a0"],["608b9d8a8cd3b7ed"]]},{"id":"a3ba3c562ac113a0","type":"trigger","z":"c89d915bdff0f798","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"30","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":650,"y":2064,"wires":[["d9f4b3b8847f0150"]]},{"id":"608b9d8a8cd3b7ed","type":"change","z":"c89d915bdff0f798","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":498,"y":2112,"wires":[["a3ba3c562ac113a0"]]},{"id":"d9f4b3b8847f0150","type":"debug","z":"c89d915bdff0f798","name":"turn off lights","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":822,"y":2064,"wires":[]}]
or you could do what you’re doing but put the two current state nodes in series not parallel