UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '44bSW5++Sr/b84ejh4AQHVOwvtKBOF+M1Av6Y+GYzRM=' 
WHERE 
  key_id = '84289e55584a949c48ddcd10b7361c5dc27c4e6c7eac6f0884f23ce80a0140af' 
  AND (
    token = '44bSW5++Sr/b84ejh4AQHVOwvtKBOF+M1Av6Y+GYzRM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025