In a 4-3 decision, a NY appeals court overturned the conviction — citing a crucial error from the presiding judge in the trial