UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Um+ROQEEKCnad5uuzP/DBDCz/h4daHck9f/zMiyFwSg=' 
WHERE 
  key_id = '19091281703b31134ea69f71bcfd77936d21759e6ade6d660c0fabdfa255c24e' 
  AND (
    token = 'Um+ROQEEKCnad5uuzP/DBDCz/h4daHck9f/zMiyFwSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015