“When” based on what will happen first: sunrise or a set time

“When” based on what will happen first: sunrise or a set time. How to do it smartly and simply?

It’s this simple:

trigger:
  - platform: sun
    event: sunrise
  - platform: time
    at: "08:42:00"

Stopping the second one occurring with a condition may or may not be required depending on your actions.

Really? No “if” or “when” or anything? How do I know if stopping may or may not be required?
Now it looks like this:
alias: Kitchen table off

description: ""
trigger:
  - platform: sun
    event: sunrise
    offset: "00:10:00"
  - platform: time
    at: "05:00:00"
condition: []
action:
  - service: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.table_light
mode: single

Turning off a light that is already off does nothing. So what you have is fine.

Thanks for the clarification.