The cron sends invoices that are queued for delivery. The status of the invoice is irrelevant. For instance, if you create an invoice that you want to be automatically delivered to the client for their records, but the client pays for it immediately after you've created it, it will then be closed. Five minutes later when the cron runs, it will still deliver that closed invoice to the client. If it didn't do this, then the client wouldn't have a copy of the invoice which you explicitly said you wanted done when you created it.
The query I included above does not delete closed invoices, rather it removes them from the delivery queue. Those invoices will simply not be queued for delivery anymore, and thus, a copy of them won't be sent to the client when the cron runs. Based on the issue you've described, this sounds like what you want.