I am not the best at this, but I did write the SQL query for myself for this same purpose. If you are good with SQL, you might be able to improve upon this.
I clean up these "bogus" users somewhat regularly. For example, when I ran my query right now I came up with 2 bogus users. In your case, you seem to want to get rid of 450, which could take some time doing it one by one. If you are good with SQL and databases, you could probably find a faster way of doing this.
You might want to consider using Moodle's "Bulk user actions" to start finding groups of bogus users. For example, you might want to find all users that are "not confirmed." Or all users "not in your country." Of the 450, this process might get you somewhat quickly to where you want to be.
Okay, here's the code.
# User who are not valid
WHERE id NOT IN
(SELECT DISTINCT u.id
FROM prefix_role_assignments ra
JOIN prefix_user u ON u.id = ra.userid
JOIN prefix_role r ON r.id = ra.roleid
JOIN prefix_context cxt ON cxt.id = ra.contextid
JOIN prefix_course c ON c.id = cxt.instanceid
WHERE ra.userid = u.id
AND ra.contextid = cxt.id
AND cxt.contextlevel =50
AND cxt.instanceid = c.id)
AND deleted = 0
AND suspended = 0
AND firstname NOT LIKE "guest user"