The ruling Barisan Nasional coalition has won the crucial Ijok by-election with a bigger majority of 1,850.