This was a decision made by a judge in Brazil and the way for Apple to appeal will be to go to the next instance (not sure if second or third in this case), which will be a different court with different judges.
And differently from the US, judges here are not elected nor appointed by the executive (with the sad exception of the supreme court); they pass exams, are nominated with stability (can't be fired without just cause), that way they are pretty much discouraged of doing "shakedows" or accepting "case or phones", as they risk losing a very comfortable and prestigious position.