To convert all topics, the SQL would be:
UPDATE FORUM_TOPICS SET T_SUBJECT = LEFT (CAST (T_MESSAGE As nvarchar (50)),50)
You can change the 50 value to a bigger or smaller number, depending on how many characters you want.
To add a condition to change only the titles that begin with '<script', then the code would be this one:
UPDATE FORUM_TOPICS SET T_SUBJECT = LEFT (CAST (T_MESSAGE As nvarchar (50)),50)
WHERE LEFT(T_SUBJECT,7) = '<script'
I'm admitting that there are no spaces in the title, before '<script>'. If you have normal topics, without such title, use the latter statement, not the first, cause the first will change all your topics.