UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GhuE/+aAEULkrAQn8QgC0nb6nis5B3XwKPSHwp4H5TA=' 
WHERE 
  key_id = 'f6f9c128efb313d92086de0d71babd51d56b32fcd08e6e545710e2f297dcf8b0' 
  AND (
    token = 'GhuE/+aAEULkrAQn8QgC0nb6nis5B3XwKPSHwp4H5TA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014