UPDATE wp_posts
SET
post_content = REPLACE( post_content, 'http://mysite.com', 'https://mysite.com' ),
guid = REPLACE( guid, 'http://mysite.com', 'https://mysite.com' )
WHERE
post_content LIKE '%http://mysite.com%'
OR guid LIKE '%http://mysite.com%';
MySQL UPDATE and REPLACE
This post brought to you by RocketGeek, ButlerBlog, and the following: