bar of door, bolt of lock
楗 centers on a physical barrier that secures an opening: a bar across a door or the bolt of a lock. Both meanings describe the same kind of sturdy wooden crosspiece used to fasten an entrance.
楗 combines 木 (wood) with 建, which likely contributes the sound and the idea of setting up or establishing something solid. Together they suggest a wooden bar set in place to secure a door.
The left side is wood 木, and the right side 建 suggests building or setting up. Picture a heavy wooden bar built into a door frame to lock it shut.
For ケン, imagine a sturdy wooden bar that looks like a giant Ken doll lying across the door: Ken -> ケン, and the bar locks everything tight.