How to update url_alias after SELECT FROM url_alias
Regarding the query, you can do the query using a temporary table:

CREATE TABLE `tmp` ( alias varchar(255));

INSERT INTO tmp (SELECT alias 
FROM url_alias LEFT JOIN node 
ON CONCAT('node/',node.nid) = url_alias.source 
WHERE node.type = 'forum');

UPDATE url_alias 
SET alias = REPLACE(alias, 'content/', 'forum/') 
WHERE alias in (SELECT alias FROM tmp);

DROP TABLE tmp;


But if there are lots of those aliases with all different cases, it's better to follow the following steps:


Delete all records from the url_alias table.

TRUNCATE TABLE url_alias;
Go to your admin interface at yoursite.com/admin/config/search/path/patterns and define the patterns for the needed node types.
Go to the 'bulk updates' tab of the URL Aliases definitions (yoursite.com/admin/config/search/path/update_bulk) and bulk update all content paths.