It depends a little on what you mean by ‘mask’. If you mean layer mask like the kind you draw on a layer with the mask tool, then I don’t think so… I don’t know how you would use an expression to change the shape/vertices of a layer mask.
If you mean you’re using a layer as a Track Matte (or Set Matte effect) to reveal the text or the shape layer behind the text, then yes, since you can use sourceRectAtTime() to affect the position of the matte layer.
Assuming the reveal is a kind of simple wipe on the x-axis, try this:
Create a comp-sized solid and name it ‘matte’ and parent it to the layer that you want to reveal (it will make the expression a bit easier).
Add a position keyframe for the matte where and when you want the wipe to start, and then add another keyframe when you want it to end (the final position doesn’t matter since the expression will handle that, but maybe drag it halfway across the screen).
Then try this expression for the matte layer’s position:
startX = key(1).value[0] ;
rect = parent.sourceRectAtTime() ;
endX = rect.width +sourceRectAtTime().width / 2 ;
x = ease( time, key(1).time, key(2).time, startX, endX ) ;
[ x, value[1] ]
The matte layer should now animate from the start position (from the 1st keyframe) to the right edge of the parent.