RewriteCond %{QUERY_STRING} ^pageid=325(&|$)
RewriteRule ^folder/(index\.cfm)?$ http://www.example.com/new-url.htm? [R=301,L]
The above corrects several faults.
Do you really need the new URL to end ".htm"? I would aim for extensionless URLs on the new site.
Additionally, if there are a large number of these redirects to perform, you would be better off not having a huge list of redirects in the htaccess file.
Instead you should internally rewrite (that's internally rewrite using a single rule, not externally redirect) all of these requests to a special PHP script that looks up the new URL in an array and uses the PHP HEADER directive to send a 301 redirect to the new URL.
RewriteCond %{QUERY_STRING} ^pageid=([0-9]+)(&|$)
RewriteRule ^folder/(index\.cfm)?$ /special-script.php?id=%1 [R=301,L]
You can use a language other than PHP if you want, this was just an example.
This internal rewrite must unusually appear near the beginning of the htaccess file (after the rules that block access, and before rules that redirect). You MUST also ensure that these requests cannot be redirected by the non-www/www rule in the htaccess file (add a RewriteCond exclusion to that rule) otherwise non-www requests for the old URLs will expose the special-script internal path back out on to the web as a new URL and create a double redirect chain for those requests.
That would be a disaster.