MySQL UPDATE to replace text in LONGTEXT field
There is an error in your query near 

AS w`


Alias name "w" should instead be 

`w`


Try this:

UPDATE wp_posts AS `w` 
SET w.post_content = REPLACE(w.post_content, 'my-old-site.com', 'my-new-site.com');