Esto es mejorable pero me parece que buscas algo así
select *,
case
when locate('search_test',field) < 10 then substring(field,1,char_length('search_test')+10)
else substring(field from locate('search_test',field) - 10 for char_length('search_test') + 20)
end as content
from table
where field like '%search_test%'