UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+cZ3X14o3/VoimdiZDMrOl4ERzLU8YikpZBqHCcx1CI=' 
WHERE 
  key_id = 'a070231dc87d24e92cdc770c54113a1c9b059ddeb3e13be92e8b632b80a738f8' 
  AND (
    token = '+cZ3X14o3/VoimdiZDMrOl4ERzLU8YikpZBqHCcx1CI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027