England registered a narrow 22-run win to go 2-1 up in the five-match series, bowling India out for 170 in the chase of 193.