How to unlock a layer even though it is visible and the padlock is greyed out?

In Photoshop?

If it’s the ‘Background’ layer, double-click it to convert it into a regular layer. Or if all else fails, press Ctrl + J to duplicate the layer.