Any way to update VARBINARY value on certain position? for example, if i have string '012345678', and i need to update position number 4 into another byte/character 'x' for example:
INSERT INTO foo(pk,pos) VALUES('abcdefghi',5)
ON DUPLICATE KEY UPDATE
  pk = CONCAT(
     SUBSTRING(pk,1,VALUES(pos)-1),
     SUBSTRING(VALUES(pk),VALUES(pos),1),
     SUBSTRING(pk,VALUES(pos)+1)
  );

-- simpler example:
SELECT CONCAT(SUBSTRING('abcdefghi',1,5-1),SUBSTRING('123456789',5,1),SUBSTRING('abcdefghi',5+1));
-- abcd5fghi

how to do this in VARBINARY data type?
You can use the INSERT function:
INSERT(String, StartingPosition, CharsToDelete, 'StringToInsert')

So if you wanted to replace one character at position 4 in the string abcdefghi, the expression would go like this:
INSERT('abcdefghi', 4, 1, 'x')

See for yourself in this demo.
The expression would only return a modified string. Use it in an assignment to actually write the result, where necessary.