OK, I tried to work this out on paper and somehow got the opposite of what I intended.
If you paste the following code in to the Anchor Point property of a layer, and then try to move the layer around the comp with the arrow cursor, the layer stays in the centre and the anchor point moves instead.
What I wanted was the opposite: to be able to move the layer and have the anchor point stay in the middle of the comp. I'm approaching it backwards somehow.
You cannot change both the position and the anchor point using expressions since you need the anchor point value to be affected by the position value before its expression value was evaluated, you can do the following to achieve your goal:
1) Create a null layer and make it the parent of your layer.
2) apply this code to the null's position: value - thisComp.layer("White Solid 1").transform.position
3) apply this code to your layer's anchor point: value - transform.position
4) Hide the null layer.