x27 is the hexadecimal value for the single quote character: '
For a complete set of hex, octal, decimal values for the characters of the English alphabet plus some enlightening context, check, for example, https://simple.wikipedia.org/wiki/ASCII
The \x27 must be interpreted by sed, but some versions don't - it's not standard.
But the shell treats '\'' within a 'string' as a literal '
(The first ' ends the string followed by an escaped ' followed by another ' that starts the remaining string.)
Indeed the following is portable