You can use this if the div
will always be a sibling of the span
with the attribute.
$('#MyDiv').nextAll('[data-my-custom-attribute="ValueX"]:first').find('span').text('something');
After your edit
I guess you only need that :
$('[data-my-custom-attribute="Value1"] span').text('something');