The condition is NOT true "lock jaw". Rather, a sore jaw on one side that makes it hard to open your mouth or chew is most likely that you clench your teeth at night. It's a common problem to many people living in these stressful days. A dentist can evaluate your bite and make a mouth guard for you to wear at night. The mouth guard helps to prevent clenching and so it keeps the jaw/facial muscles from going into spasm during the night.
Until you see the dentist, apply ice--not heat----to the jaw in front of the ear. Ice can be left on about 10-15 minutes, then off. You can repeat several times a day.