UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rLDNev8FVSv9v8Xx8/Zu5UXaBdNIdYzHAwX4XqpfXI8=' 
WHERE 
  key_id = '72b005f01b2c5eef1fc3fc83879f0552b6059bae2f4fd088c8db5b1b1569cacf' 
  AND (
    token = 'rLDNev8FVSv9v8Xx8/Zu5UXaBdNIdYzHAwX4XqpfXI8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031