I’ve done similar, the key node in my attempt is a ‘wait until’. The 1st one (called initial timer) is triggered when the door is unlocked, and waits for 5 minutes, unless the door is locked again.
Then it sends a notification, and goes to a second timer which waits for 15 minutes before repeating the notification.
[{"id":"c4da78f2.382a58","type":"server-state-changed","z":"9c580098.19d8a","name":"lock state change","server":"cc436e5e.bbf7e","version":1,"entityidfilter":"binary_sensor.loungedoorlock","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":180,"y":620,"wires":[["a0a2690e.b46f58"],[]]},{"id":"a0a2690e.b46f58","type":"ha-wait-until","z":"9c580098.19d8a","name":"initial timer","server":"cc436e5e.bbf7e","outputs":2,"entityId":"binary_sensor.loungedoorlock","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"5","timeoutUnits":"minutes","entityLocation":"data","entityLocationType":"msg","checkCurrentState":true,"x":420,"y":620,"wires":[[],["47635cf0.dc8574"]]},{"id":"34f09ea1.dc89f2","type":"api-call-service","z":"9c580098.19d8a","name":"notify unlocked","server":"cc436e5e.bbf7e","service_domain":"notify","service":"everyone","data":"{\"message\":\"The front door has been unlocked for {{minutes}} minutes\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":620,"wires":[["a0fb93d.aff9a7"]]},{"id":"a0fb93d.aff9a7","type":"ha-wait-until","z":"9c580098.19d8a","name":"loop timer","server":"cc436e5e.bbf7e","outputs":2,"entityId":"binary_sensor.loungedoorlock","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"15","timeoutUnits":"minutes","entityLocation":"data","entityLocationType":"msg","checkCurrentState":true,"x":770,"y":500,"wires":[["357d0e17.cef0d2"],["47635cf0.dc8574"]]},{"id":"357d0e17.cef0d2","type":"api-call-service","z":"9c580098.19d8a","name":"notify locked","server":"cc436e5e.bbf7e","service_domain":"notify","service":"everyone","data":"{\"message\":\"The front door is now locked\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1040,"y":500,"wires":[[]]},{"id":"47635cf0.dc8574","type":"change","z":"9c580098.19d8a","name":"","rules":[{"t":"set","p":"minutes","pt":"msg","to":"$round(data.timeSinceChangedMs / 60000,0)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":620,"wires":[["34f09ea1.dc89f2"]]},{"id":"cc436e5e.bbf7e","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false}]