If you enable IP restriction, there is a possibility that your own IP address might not be in the range, which could result in getting locked out. To prevent this, you need to add your IP to the Allowed IP range. Input your IP in the "IP start" and "IP end" fields to permit your IP.
Please watch the following for a detailed explanation: