Upon motion of the State, the judge may declare a mistrial if there occurs during the trial, either inside or outside the courtroom, misconduct resulting in substantial and irreparable prejudice to the State's case and the misconduct was by a juror or the defendant, his lawyer, or someone acting at the behest of the defendant or his lawyer. If there are two or more defendants, the mistrial may not be declared as to a defendant who does not join in the motion of the State if:
N.C. Gen. Stat. § 15A-1062