It sounds like you have a couple of things going on.
The soreness in the joint, which one you do not say, is most like the beginnings of a degenerative process like osteoarthritis. This can cause osteophytes (bone spurs) around the joint. Another common cause of lumps around the joints is called a mucus cyst, a type of ganglion cyst. It is also common for these joints to snap, click, pop, etc.
However, the locking of the thumb in a flexed position, is most likely a trigger thumb. This is actually a tenosynovitis of the tendon and tendon sheath. The flexor tendons become inflamed, develop a thickening, and thus cannot smoothly pass through the pulleys. The thickening catches on a pulley and becomes stuck in flexion. Some patients can actively extend the thumb themselves, while others have to use the other hand to snap the thickening back through the pulley.
You should see a hand surgeon for the problems. The trigger thumb can be easily treated with an injection of cortisone and local anesthetic. 99% of triggers can be cured with less than three injections. For the very rare case that does not respond to the injections, a surgery can be done to release the pulley.