UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Bumm7Ciuj9WW02ppdwSbEK7gWlTZ7jeK9xcs97NTZ30=' 
WHERE 
  key_id = 'eef35ababfc5d3a585dd079a3d72b8207277e44b08ff54cb5e4cf97a57e5ac24' 
  AND (
    token = 'Bumm7Ciuj9WW02ppdwSbEK7gWlTZ7jeK9xcs97NTZ30=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020