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

The question is in the title.

Hi Dejan, welcome to the forum

Maybe so, but the question is unclear to me.
visible where in what?

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.