9000 rows affected message, but no rows actually changed
I did the same as you did and it worked.

mysql&gt; INSERT INTO `test`.`wp_posts` (`idws_posts`, `post_content`) VALUES ('1', '&lt;img src="http://31.media.tumblr.com/eet1r5co8so1/tumblr_mzlt6zqeet1r5co8so1.gif" alt="" /&gt;');
Query OK, 1 row affected (0.01 sec)

mysql&gt; INSERT INTO `test`.`wp_posts` (`idws_posts`, `post_content`) VALUES ('2', '&lt;img src="http://11.media.tumblr.com/L4B1q/tumblr_ml5i2cGL4B1qz4fjqo1.gif" alt="" /&gt;');
Query OK, 1 row affected (0.00 sec)

mysql&gt; INSERT INTO `test`.`wp_posts` (`idws_posts`, `post_content`) VALUES ('3', '&lt;img src="http://51.media.tumblr.com/n42sryL4JG1rda3bfo1/tumblr_n42sryL4JG1rda3bfo1.jpg" alt="" /&gt;');
Query OK, 1 row affected (0.00 sec)

mysql&gt; INSERT INTO `test`.`wp_posts` (`idws_posts`, `post_content`) VALUES ('4', '&lt;img src="http://31.media.tumblr.com/eet1r5co8so1/tumblr_noui3gHzxp1qfvouao1_1280.jpg" alt="" /&gt;');
Query OK, 1 row affected (0.00 sec)

mysql&gt; 
mysql&gt; SELECT * FROM test.wp_posts;
+------------+----------------------------------------------------------------------------------------------------+
| idws_posts | post_content                                                                                       |
+------------+----------------------------------------------------------------------------------------------------+
|          1 | &lt;img src="http://31.media.tumblr.com/eet1r5co8so1/tumblr_mzlt6zqeet1r5co8so1.gif" alt="" /&gt;        |
|          2 | &lt;img src="http://11.media.tumblr.com/L4B1q/tumblr_ml5i2cGL4B1qz4fjqo1.gif" alt="" /&gt;               |
|          3 | &lt;img src="http://51.media.tumblr.com/n42sryL4JG1rda3bfo1/tumblr_n42sryL4JG1rda3bfo1.jpg" alt="" /&gt; |
|          4 | &lt;img src="http://31.media.tumblr.com/eet1r5co8so1/tumblr_noui3gHzxp1qfvouao1_1280.jpg" alt="" /&gt;   |
+------------+----------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

mysql&gt; 
mysql&gt; UPDATE test.wp_posts 
    -&gt;     SET post_content = REPLACE(post_content,'31.media.tumblr.com/','41.media.tumblr.com/') 
    -&gt;     WHERE post_content LIKE '%31.media.tumblr.com/%' AND post_content NOT LIKE '%.gif%';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&gt;         
mysql&gt; SELECT * FROM test.wp_posts;
+------------+----------------------------------------------------------------------------------------------------+
| idws_posts | post_content                                                                                       |
+------------+----------------------------------------------------------------------------------------------------+
|          1 | &lt;img src="http://31.media.tumblr.com/eet1r5co8so1/tumblr_mzlt6zqeet1r5co8so1.gif" alt="" /&gt;        |
|          2 | &lt;img src="http://11.media.tumblr.com/L4B1q/tumblr_ml5i2cGL4B1qz4fjqo1.gif" alt="" /&gt;               |
|          3 | &lt;img src="http://51.media.tumblr.com/n42sryL4JG1rda3bfo1/tumblr_n42sryL4JG1rda3bfo1.jpg" alt="" /&gt; |
|          4 | &lt;img src="http://41.media.tumblr.com/eet1r5co8so1/tumblr_noui3gHzxp1qfvouao1_1280.jpg" alt="" /&gt;   |
+------------+----------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

mysql&gt; 


Are not you missing something?