UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EeymTFVmSkxfxUsFz+h2kS0zs8E4WOLrmoStcohUNw0=' 
WHERE 
  key_id = '10e9fee957a2d1f884e653a3b733f061d979a65d574ea368322dc9b0a9108ec7' 
  AND (
    token = 'EeymTFVmSkxfxUsFz+h2kS0zs8E4WOLrmoStcohUNw0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00119