A custody or visitation agreement reached as a result of mediation may be modified at any time at the discretion of the court, subject to Chapter 1 (commencing with Section 3020), Chapter 2 (commencing with Section 3040), Chapter 4 (commencing with Section 3080), and Chapter 5 (commencing with Section 3100).