When Reasonable
A law is a reasonable ordinance promulgated by proper authority for the common good. As such, reasonable laws will always be in accord with the divine will as known through revelation or natural law. Laws contrary to the divine will law are no long reasonable and, therefore, do not compel an individual’s obedience.
For this reason, reasonable legislation will include religious or conscience exemptions. Laws which compel a person to act against the divine will must be disobeyed under the biblical principle, “It is better to obey God than men” (Acts 5:29).
However, there can be laws which are not contrary to divine revelation or natural law which one may still consider unjust. In those cases, one could consider themselves as “going the extra mile” (cf. Matthew 5:41) for the possible sake of the common good even if not compelled to do so by obedience.