In brief :
Solution A : Use the context state var.
In prepareQuery(), create a new context case, and call this context for your lists.
Lists are prepared in the view, so
1. find the model which prepare thoses items.
2. Just before getItems(), add
$model->setState('context', 'myContext');
3. Add your custom query in prepareQuery().
in the switch(), add a new case. Call it as your please.
Solution B :
Instance a regular filter directly in the view.
1. find the model which prepare thoses items. (same)
2. Just before getItems(), add
$model->setState('filter.ordering', 'a.activ = 1');
This is possible because ordering is already a possible filter.
If you want a special behaviour, so the use the solution A : Custom SQL Query.
In both cases A & B, the security ACL is always handled per default if you code it correctly.