I think your problem is that you need to tell SQL what you mean more specificaly. Right now you have
... WHERE <condition1> OR <condition2> OR <condition3> AND <condition4
+>
like this if conditions 1 or 2 are true 3 and 4 won't even be checked as they are irrelivent you already have a true
try re-writing your statement with brackets, something like this.
... WHERE (<condition1> OR <condition2> OR <condition3>) AND <conditio
+n4>
Written like this its saying any of the first 3 conditions may be true but must be combined with condition 4 being true (ie you active state check).
Hope this helps
---If it doesn't fit use a bigger hammer