Use code below, assuming that comp contains a solid, with mask applied.
For the time adjustment – not 100% sure about the roving keyframes, but it might be impossible to move them – only to store values, remove current keys and then add new at different times.
var curComp = app.project.activeItem;
var curLayer = curComp.layer("White Solid 1");
var curMaskAtom = curLayer.property("ADBE Mask Parade").property("ADBE Mask Atom");
var curMask = curMaskAtom.property("ADBE Mask Shape");
var posProp = curLayer.property("ADBE Transform Group").property("ADBE Position");
curMask.selected = true;
app.executeCommand(19); //Copy command
curMask.selected = false;
curMaskAtom.selected = false;
posProp.selected = true;
app.executeCommand(20); //Paste command
Find out more:
After Effects Tutorials: motion design, expressions, scripting.