Doing this with the typical delimiter '/' can look pretty ugly due to escape characters:
$ echo /my/old/path | sed 's/\/my\/old\/path/\/this\/new\/path/g'
/this/new/path
However this looks much cleaner by changing delimiter, the char after 's':
$ echo /my/old/path | sed 's|/my/old/path|/this/new/path|g'
/this/new/path