For dynamic collision-free trajectory planning in dual-robot and human collaborative tasks, this paper develops an online dual-robot Mutual Collision Avoidance (MCA) scheme based on convex optimization. A novel convex optimization formulation model, named Disciplined Convex programming by Shifting reference paths (DCS), is proposed for solving the single-robot trajectory optimization problem. Furthermore, a new dual-robot trajectory convex optimization algorithm is presented for online adjustment of the dual-robot trajectories according to the collaborative task priority. The overall pipeline, named DCS-MCA, generates collision-free and time-optimal dual-robot trajectories, while prioritizing the task accessibility of the high-priority robot. Simulation experiments demonstrate that DCS exhibits comparable performance to the current state-of-the-art single-robot motion planner, while the DCS-MCA outperforms common algorithms by up to 30% in time optimality for dual-robot collaborative tasks. The feasibility and dynamic performance of the proposed approach are further validated in a real collaborative cell, illustrating its suitability for collaborative dual-robot tasks in moderately dynamic environments.