UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MSNQj1Rd3y6u+BoIxHwhZKjeVvEPuqO2wSYK269ANJ4=' 
WHERE 
  key_id = '955f2c37ccaafdab7cd26ac54c31b7ee4e4e3bc47ec3da896b60a26f6ab347db' 
  AND (
    token = 'MSNQj1Rd3y6u+BoIxHwhZKjeVvEPuqO2wSYK269ANJ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031