The 27-year-old joined the Championship side from Bournemouth in August 2016 and has made 25 league appearances for the Whites.
O'Kane told LUTV after signing the new contract: "I'm delighted. I've loved every minute that I've been here.
"It's a really impressive club. It's moving in the right direction and I'm happy that I'm going to be part of it. There's been a lot of change for the better. Who knows where we'll end up?"