How to reset a timer if new MQTT event happens?

This automation turn off all lights after 2min, but I wanted to reset the timer if there is any new MQTT trigger, is it possible?
This is the code:

alias: Turn On Garagem
description: ""
trigger:
  - platform: mqtt
    topic: garagem
    payload: garagem
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: 94cd9df7c88224c98f13715eca8a403b
    entity_id: light.garagem_light_2
    domain: light
    flash: short
  - type: turn_on
    device_id: 94cd9df7c88224c98f13715eca8a403b
    entity_id: light.garagem_light
    domain: light
    flash: short
  - type: turn_on
    device_id: 754631f8f210927c9f51a81f5f90cc56
    entity_id: light.lavanderia_porta_light
    domain: light
    flash: short
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 94cd9df7c88224c98f13715eca8a403b
    entity_id: light.garagem_light
    domain: light
  - type: turn_off
    device_id: 94cd9df7c88224c98f13715eca8a403b
    entity_id: light.garagem_light_2
    domain: light
  - type: turn_off
    device_id: 754631f8f210927c9f51a81f5f90cc56
    entity_id: light.lavanderia_porta_light
    domain: light
mode: single

You are using a delay:

why not use a timer

I would break the automation into 2 automation

1… trigger turn lights on and start the timer or restart
mite have put a if timer active then restart else timer.start

2… timer finish them turn lights off

where It would start a timer count down base on the current trigger then when That time is Finished it would turn off the Lights

them if the trigger happen again restart that timer again.