united-states
Minimum sentencing laws do not prescribe any punishment for a judge that simply refuses to obey them. See 18 U.S. Code § 3553 as an example that explains how sentencing must be enforced, yet no mention of punishments for violating these laws. It also makes mention of how minimum sentencing can be avoided by a judge lawfully as well.
Judges do not risk jail time or fines for breaking these laws, as they have judicial discretion, which is literally a power defined by what it means to be a judge, to hand out whatever sentence they think is appropriate. (Note: there may be exceptions, but I couldn't find any. If any such examples exist, they are likely rare)
If a judge refuses to hand out an appropriate sentence by these laws, there are options available. The two main choices are by review, and by appeal. The review board has a few options. They can accept the lower sentence, they can reject the sentence to have the judge resentence, or they can assign the sentencing to a different judge. By way of appeal, the prosecutors can choose to appeal to a higher court. Eventually, either the sentence will become fixed at the reduced level, or it will be corrected by someone else in the system, if not the judge, then either an associate or superior.
Either way, the odds are stacked against a rebel judge. However, at least one documented example of this exists, the story of Judge John Coughenour (linked below). He sentenced the same person three times for the same crime, and while he eventually did get a "victory," the story goes to demonstrate that (a) judges can rebel and get some effect, and (b) even as hard as he fought, he wasn't punished, but he also didn't get nearly the effect he was hoping for, despite a promise from the government to reduce the criminal's sentence in exchange for cooperation.
While judges can be censured, reprimanded, removed from office, voted out (at least, at lower levels), and impeached, most of these punishments are reserved for situations of corruption, bribery, etc, rather than simply executing their judiciary discretion, which is one of the core powers granted to them by the judicial branch.
Further Reading: