What you need to do is:
set /files/test.xml/configuration/properties/property[#attribute/name='username']/#text NEWUSER
This selects the property (/files/test.xml/configuration/properties/property
) whose #attribute/name
subnode matches username
, and sets its #text
subnode as NEWUSER
.