UPDATE `ezcontentobject_tree`
SET `depth` = round(length(`path_string`) - length(replace(`path_string`, "/", "")) / length("/")) - 2
WHERE `path_string` LIKE '%/42/%';