Spin dynamics of close-in planets exhibiting large transit timing variations