UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RLs0VzkRRle0akWkKmzvZi8ya5KMkwzsfSis1H92QZs=' 
WHERE 
  key_id = '4922c7b89e864d3a6eeaa4e9e48250f3394f336cb6c747c85240e945b64902e6' 
  AND (
    token = 'RLs0VzkRRle0akWkKmzvZi8ya5KMkwzsfSis1H92QZs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032