How to disable or enable a constraint of a bone, by a rotation of another bone?
That can be this kind of setting:

Here three bones: one parent and two children.
Bone.002 has a constraint: track to an empty.
The constraint activation has de driver:
var is based on Bone.001 and its &quot;W&quot; rotation in quaternion mode and local space.
The driver expression is to test if &quot;W&quot; is below 1. In this case that mutes the constraint.
The eye corresponds to a &quot;mute&quot; property, so a True value to mute.

Complement
If you want the constraint to be &quot;mute forever&quot;, you can use a little script.
Add a custom prop to the constraint target (the empty here), named &quot;prop&quot; and set to 0 by default.

Then execute this script:
import bpy

def lock_constraint(self,rotation):

    self.target[&quot;prop&quot;] += abs(1 - rotation)
    
    return self.target[&quot;prop&quot;] &gt; 0    

bpy.app.driver_namespace[&quot;lock_constraint&quot;] = lock_constraint

&quot;lock_constraint&quot; will be known in driver space, so that you can use it in the driver:

As &quot;prop&quot; can only grow, once the other bone is rotated the constraint will stay mute.