I remember in one of my law classes in grad school and asking my professor "but what do we do when the supreme court's ruling is obviously unjust/wrong?" and she looked at me like I killed someone in front of her lol
An unjust law is not a law but a tyranny, imo. There is no moral obligation to follow an unjust law. The moral obligation is to act justly even if counter to the legal obligation. One example is of course if the SS is looking for someone in most cases it is right and good to help the person escape.