Correct. You may wish to use the key called label because it appears to use the same terms that Home Assistant uses to indicate the two states of a lock: LOCKED and UNLOCKED.
Another way to do it is to leave state_locked and state_unlocked with their default values and simply use the template (which you are already using) to convert the received states.
value_template: "{{ 'LOCKED' if value_json.value == 'true' else 'UNLOCKED' }}"
The only thing you may need to tweak is whether the test should use 'true' or true (string value or boolean value). It depends on how Home Assistant interprets the received JSON. My bet is it’ll be handled as a string but I may be wrong.