But the big question: Will you update 1 or many records back in the DB?
If only 1 record, then quite frankly who cares you you do it?
And I might even suggest the sending data back to server via JSON isn't necessarily the best choice. But it's certainly workable.
Assuming you only need to update one record, and assuming that the JSON is as simple as you showed it, I'd probably just do
$json = $_GET["json"]; // or POST of course
$data = json_decode( $json, true ); // creates an associative array
$sql = "UPDATE table SET x = " . ( (int) $data["x"] ) . ", y = " . ( (int) $data["y"] )
. " WHERE name = '" . mysql_real_escape_string($data["name"]) . "' ";
And, really, even if you had multiple records to update, I'd do it similarly. One record at a time in a loop. MySQL does understand multi-record updates base on distinct keys. (It could do multi-record INSERTs, though you don't gain a whole bunch.)