You can combine your SQL query with the mergeUsers tool to remove the users in batch. One example is given here:
If new spam registrations are ongoing, there are several plugins which can help: