Any person, including an applicant for a permit or the commission, aggrieved by the decision or action of a local government that is implementing a certified local coastal program or certified port master plan, or is exercising its powers pursuant to Section 30600.5, which decision or action may not be appealed to the commission, shall have a right to judicial review of such decision or action by filing a petition for writ of mandate in accordance with the provisions of Section 1094.5 of the Code of Civil Procedure within 60 days after the decision or action has become final. The commission may intervene in any such proceeding upon a showing that the matter involves a question of the conformity of a proposed development with a certified local coastal program or certified port master plan or the validity of a local government action taken to implement a local coastal program or certified port master plan. Any local government or port governing body may request that the commission intervene. Notice of this action against a local government or port governing body shall be filed with the commission within five working days of the filing of this action. When an action is brought challenging the validity of a local coastal program or certified port master plan, a preliminary showing shall be made prior to proceeding on the merits as to why such action should not have been brought pursuant to the provisions of Section 30801.