When you've focused the lens at a certain point you've actually focused an entire plane (that includes the point you've set your focus at) called the focal plane. This plane is perpendicular to the optical axis of the lens. Objects that are close to this plane (but not in it) may be acceptably in focus depending on the depth of field.
The left diagram below shows a subject that the camera locks it focus at. The red gradient shows the current depth of field where the more saturated the colour the better the focus. The area outside this gradient is out of focus.
Recomposing (as shown in the right diagram above) creates an angle between the new extension of the optical axis and the old one causing the focal plane to move. This throws the subject you focused the lens out of focus and the greater the angle, the greater the focus shift.
If the subject is moving this complicates things even further. If the subject moves towards the new plane of focus it will be moving into a more focused area, whereas if it moves from the plane of focus it will be even more out out focus than if it hadn't moved (like in the left diagram below).
You can increase you chances of nailing the focus by using a smaller aperture giving you a larger depth of field (the red gradient will stretch out further). You can also try to mentally visualise how the plane of focus moves in order to press the shutter at the exact time your subject moves into focus like in the right diagram above.