In MySQL sometimes we need to update a set of rows within the specific range of ids. If the range is short then we can use the ID IN (ids) argument. If it's long and we know that range, let's use the BETWEEN value AND value argument.
UPDATE `table` SET `password` = (SELECT MD5(uniqueName)) WHERE `id` BETWEEN 863 AND 987