What should I do for my jaw locking up?

Complex. Complex TMJ problem. Condition is advanced once jaw starts locking. See a TMJ expert.Any dentist can be a TMJ expert with the proper training and experience. Most commonly, oral surgeons, prosthodontists, and orofacial pain specialists. Ask your MD, your dentist and your dental society for referrals.
Jaw locking up. If your jaw is locking closed, it generally means that the disc in the jaw joint may be displaced. If your jaw is locking open, that means that the jaw is itself becoming dislocated, which is much less common. For a closed lock that fails to respond to simple measures, it has been shown through many studies that the most effective treatment is TMJ arthrocentesis or arthroscopy, to unlock the jaw.
Jaw locking. Usually means disc out of position, fairly advanced jaw joint dysfunction. Challenge is to determine the cause(s) of the displacement and then determine the correct treatment. Your Dentisr may want you to see Oral Surgeon, Orthodontist, or other practitioners. Seek help before more damage is done.