UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zvk8HKvJGXY3LJGgdaZLGhyszfj/G4uCvX9HWttn+/U=' 
WHERE 
  key_id = 'bb036900a6800e522ed1f273f749aa1c9dd432f8918c1433a7d6c35b67c51efa' 
  AND (
    token = 'zvk8HKvJGXY3LJGgdaZLGhyszfj/G4uCvX9HWttn+/U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032