I wouldn't raise this preflop, I think it is definitely too thin from the CO.
On the button it is OK if the blinds are weak players that are unlikely to 3bet you, however against competent opponents I would still fold this on the button as it is too disconnected and weak. If you had a suited ace (ie your hand was AQ42 instead of KQ42) I think opening on the button is standard, but I would still fold in the CO.
Your flop bet is good. His range is very wide and it will be difficult for him to continue without hitting this board very hard, especially out of position. You can put a lot of pressure on him if he just check calls you and a brick falls.
The turn bet is good as you protect your hand and possibly get value out of flush draws or two pair/sets trying to hit a boat. Once he raises you however I think you should be folding, it is very unlikely that he is doing this with any hand other than the nuts and he is very likely to have a re-draw.
Calling can be okay if you have a plan for the river. For example, if you think he would check-raise any broadway straight here then you can call and if the river is a club or a board pair and he checks you could try and steal the pot, however I would prefer some further reads for a play like that.
As played the river fold is definitely good. If he had checked the river I would be tempted to bet to steal the pot as mentioned above.
Roy