You can use "Batch update threads" -> /admin.php?threads/batch-update
Select just "Moderated" threads and delete all of them.
Raw SQL is not a good idea IMHO..
Edit: If the spam threads are from just a few different accounts, then you can also search by user in order to not delete threads, that are not spam.