Add locking functionality to put method

Don't safe_json_decode nil body values from put

Use ngx.encode_args instead of table concat for request options

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>