You can use the runIn method, as long as your handler is the same each time, the previous job will get overwritten.
So… (mostly pseudo-code so you’ll have to fill in the gaps and this is only a basic guide)
*** Door sensor open/close ***
light.on()
runIn(60, turnOffLight) // Set timer for 60 seconds
*** Motions sensor detects motion ***
light.on()
runIn(60*15, turnOffLight) // Set timer for 15 minutes
...
def turnOffLight() {
light.off()
}
So, when either of those things trigger, the timer will overwrite whichever one is currently running if there is one as long as it uses the same handler (according to the documentation)
Hope this is what you were looking for.
The documentation mentions something similar to what you want to do:
In my head, I would perhaps look at using the runIn scheduling method to schedule a defined TurnOffLight subroutine in "minutesLater for and use the unschedule method to cancel the scheduled TurnOffLight call if other priority events are observed by the other sensors.