I can use the MySQL TRIM() method to cleanup fields containing leading or trailing whitespace with an UPDATE like so:
TRIM()
UPDATE
UPDATE Foo SE
Here is an example with RegEx
SELECT * FROM `foo` WHERE (name REGEXP '(^[[:space:]]|[[:space:]]$)')