The moment you realise that the other fighter is attempting to choke you by applying a lock, you need to tuck your chin which will reduce pressure on the side of your neck and prevent the choke by allowing the oxygen to travel to your brain.
You can also alleviate the pressure of the choke by shrugging your shoulder which is free. The whole idea is to prevent the other fighter from securing a firm grip of your neck.
With your free hand you need to grab the leg of the other fighter which is close to you. If you can use both hands, well and good, but if not, then grabbing the leg with the free arm will certainly be your only option. Your objective should be to pull the leg in order to create space. The more tightly you will be grabbed the lesser chance you will have of freeing yourself.
In order to break the lock which your opponent has over your arm and head, it is very important for you to roll your free shoulder towards the head of the opposing fighter.
Now, with force, you need to pull the trapped arm and the shoulder out of the lock. If you apply force properly with your free hand while grabbing the leg of the opponent you will successfully release yourself from the choke and lock.
Now in order to stop your opponent from getting a lock on you again, stand up or move to a controlled position.