REPLACE を利用する。

update
  users,
  (
    select
      id
    from
      users
    where
      name regexp ' '
  ) as having_spaces
set
  name = REPLACE(name, " ", "")
where
  users.id = having_spaces.id