How to move keyframes using Python?
This is not hard:

bpy.data.actions[aname].fcurves[i].keyframe_points[j].co[0] = fr1


The tricky part is picking the right fcurve[i] and keyframe_points[j] if there are more than one.  You'll have to check fcurve[i].data_path and (if it's a vector data_path like location or rotation*) fcurve[i].array_index to make sure you're altering the right fcurve.