UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FFCq24imV7x+ia4Pi+FG4e/eOMxdKKWfSIb/U7JGKqQ=' 
WHERE 
  key_id = 'ba0af86b69f0ea02af67299a4896f802eb3f069def3cfe3e8abb56588002bd99' 
  AND (
    token = 'FFCq24imV7x+ia4Pi+FG4e/eOMxdKKWfSIb/U7JGKqQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00065