From a code safety standpoint, this should be OK, assuming that the result set of your query is less than 1MB. In that case, the Cursor
holds in heap space the entire result set, so it is insulated from any changes to the underlying database.
That being said, you may want to build up a list of rows to delete, simply so you can delete them in a single statement, rather than a bunch of individual statements (though wrapping those individual statements in a transaction may give you similar performance characteristics).