Steve Hays has already provided some excellent thoughts on the issue of unlawful orders over at Triablogue (link). In supplement of those thoughts, I wanted to add a couple of additional semi-related points.
1) Distinguishing Permitted Disobedience from Required Disobedience
In some cases, when someone in authority over us commands us to do something, we are required by God's law not to follow those orders. Often, there are two ways in which can "no follow orders."
For example, if a judge ordered a clerk to issue a "gay marriage" certificate, the clerk has a moral obligation under God's law not to follow that order, assuming following that order was sinful. However, there are at least two real alternatives this hypothetical clerk has. The clerk could simply refuse (i.e. disobey the order) or the clerk could resign (i.e. avoid the order). Both of these alternatives are legitimate.
Some people seem to think that a Christian's duty to disobey also entails a duty to do so following the path of least resistance. In other words, some people seem to be arguing that our hypothetical clerk must resign, rather than simply disobeying orders. This view seems to suggest that disobedience can only be a last resort - we can only disobey when our back is to the wall, so to speak.
That rationale seems intuitively wrong. It seems as though the midwives in Egypt could have sought other career options instead of continuing to deliver babies, but their choice to continue delivering babies while disobeying orders seems praiseworthy.
There may be cases where we cannot resign our way out of direct disobedience. For example, I don't think anyone believes that the apostles had the option of resigning their apostolic office in order to avoid directly disobeying the Sanhedrin.
On the other hand, that does not mean that direct disobedience is always mandatory. Remember that sometimes Christians are called to flee persecution. For example,
Matthew 10:23 But when they persecute you in this city, flee ye into another: for verily I say unto you, Ye shall not have gone over the cities of Israel, till the Son of man be come.
So, in our hypothetical example, the clerk is permitted to flee persecution, for example by simply resigning.
This is distinct from cases where we may not have any way of fleeing the persecution and disobedience is our only option, as with the Apostles in front of the Sanhedrin. Still, it is important to recognize the distinction and to permit Christians their liberty in Christ to elect between enduring persecution for the name of Christ and fleeing that persecution.
While enduring such persecution is noble and praiseworthy, it is not mandatory in every case. Therefore, while we should praise those who suffer for the sake of the kingdom, we must not condemn those who flee into another city, so to speak.