If you only change the level (Gpio_SetLevel() API) this is safe (atomic) as it has Set and Clear registers (no read modify write operations). But a direction change is not atomic.
Reading the Level from M4 actually is always atomic, so i’m not sure why you were asking it together with Point 1.
Lock mechanism would only be needed if you want to change direction of GPIOs from both A5 and M4, but for level changes or reads there is no problem.