Search and replace in post content

Okay, this always seems to happen to me. I spend ages looking for an answer and finally decide to give up and post here and then one more search finds enough to solve it.

Anyway, this is what worked for me:

update wp_posts set post_content = replace(post_content, '[/tab] 
[tab title="1024x576"]
<table class="screenshot-table">', '[tabby title="1024 x 576"]
<table class="screenshot-table onetwentyfour">');

Simply by putting the multi-line text ON multi-lines worked.

You learn something everyday!