UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KjVx4eHel0klog11FirxFw0gEkMGxi0sa4IxInHyw8g=' 
WHERE 
  key_id = '084379e34b4b180c3fe1359778c5751c78976eea1e1ca036d26085351f4c847d' 
  AND (
    token = 'KjVx4eHel0klog11FirxFw0gEkMGxi0sa4IxInHyw8g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023