The one apparent exception is if an ungodly ruler exceeds the bounds of civil authority and coercively legislates false religion. Even in this case, the disobedience must be both passive and limited, so it is not a true exception to Calvin’s general non-resistance. The people must privately refuse to participate in the particular area of false worship. They must not actively, publicly rebel against the ruler, and therefore the whole system of government which God has providentially placed over them.
Calvin authorised the people’s magistrates to act to restrain tyrants. Indeed, he saw that as part of their divine duty. Any action by these people’s magistrates against higher magistrates is categorically different from popular rebellion, because the people’s magistrates have been providentially appointed by God to protect the people. In exercising this power, they are not denying God’s providential government, but upholding it, in the manner God intended. Indeed, to not use their power to protect the people, and thus implicitly side with a tyrant, would be ‘nefarious perfidy’ (Institutes, 4.20.31).
Who did Calvin mean by the 'people's magistrates'? He could have meant unelected aristocrats, or elected parliament. Later Calvinist political theology developed it in the latter direction. This 'popular magistrate's' right of resistance was a crucial basis for the parliamentary war against the king in the English civil war, and the American war of independence.