In recent years, radio frequency identification (RFID) technology has been applied to construct better healthcare systems, offering various healthcare services that can benefit all medical staff and patients. However, because of the insecure communication channels in RFID systems, security is a main concern to be solved for RFID to be used in healthcare systems. To address this issue, recently in 2019, Safkhani et al. proposed a lightweight RFID authentication protocol in IEEE Access. The authors claimed that their protocol has a higher security level than existing protocols in this category. This article firstly analyzes the security of Safkhani et al.'s protocol, and shows that this protocol is lack of forward secrecy and scalability. Then, a new and secure mutual authentication protocol (SecMAP) is proposed to overcome these weaknesses. The security of the SecMAP protocol is confirmed with formal analyses using the Gong-Needham-Yahalom (GNY) logic and the Scyther tool. Besides, SecMAP is compatible with low-cost RFID tags. Thus, the proposed protocol can effectively provide security for RFID based healthcare systems.