An Illinois judge sentenced a 31-year-old man to 40 years in prison following convictions in two separate weapon-related cases, the Lake County State’s Attorney’s Office announced.