UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fF2oE7g4JqoFeGFV4NCsHcDCikR0ZyeUFLRSsyO2aQk=' 
WHERE 
  key_id = '4bc05b1971d92b6671f7793efaa2c995af023b14fa628869076f0cecbbc18eff' 
  AND (
    token = 'fF2oE7g4JqoFeGFV4NCsHcDCikR0ZyeUFLRSsyO2aQk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028