You can use a counted RE. For example, x{12} will match 12 x characters, and y{1,3} would match 1, 2, or 3 y characters. Here we're going to use .{30} to match 30 character wildcards (i.e. 30 of any character). The \1 in the result string matches the bracketed reference in the pattern match
sed -r 's#^(.{30})#\1213 #' file
In your updated question you now say there are 878 characters before the insert. So just amend the example's 30 to reality's 878 and insert XXX
sed -r 's#^(.{878})#\1XXX#' file
The same process can apply for any fixed-width modification.
You can use perl too, which doesn't have the line length limitations that plague some implementations of sed,
perl -pe 's#^(.{878})#$1XXX#' file