SQL query to set posts in bulk based on the post content

Look into MySQL Wildcards.

The correct MySQL Query for your search should be

WHERE tb_posts.post_content LIKE "%example.com%"

You should also be sure that you only target published posts (in contrast to nav_menu_items, revisions etc). Expand your WHERE with this:

AND tb_posts.post_type IN ('post','page',*All Posttypes you use additionally*) AND tb_posts.post_status="publish"

So your complete Query should look like this (assuming that you only use posts and pages):

UPDATE tb_posts 
SET post_status="draft" 
WHERE post_content LIKE "%example.com%"
AND post_type IN ('post','page')
AND post_status="publish"

Happy Coding!