UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fNSLgp4hsDzQJgVQOaPCQ9GRGqJD5JvzsMu4EZDlKGA=' 
WHERE 
  key_id = '92810e8582b92cd9930d7dc3f05d3c8c342eb98e54e05672be0e2d136be92d07' 
  AND (
    token = 'fNSLgp4hsDzQJgVQOaPCQ9GRGqJD5JvzsMu4EZDlKGA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025