Yes, with VBa... Simply copy this into the "ThisWorkbook" in the Visual Basic Screen and then run it (green play triangle)

Sub WalkThePlank()
dim colorIndex as Integer
colorIndex = 3 'UPDATE ME TO YOUR COLOUR OR BE FED TO THE SHARKS
Dim rng As Range
For Each rng In ActiveSheet.UsedRange.Cells
Dim color As Long
color = rng.Interior.ColorIndex
If (color = colorIndex) Then
rng.Locked = True
else
rng.Locked = false 'this will remove any locks for those not in the given color
End If
Next rng
End Sub
There is no undo in VBa, so take a copy of your file first (to create a back up)!
Colour index - http://dmcritchie.mvps.org/excel/colors.htm
How do I add VBA in MS Office?
The above assumes you have no merged cells and that your worksheet is not protected.
If you are not sure what the colorIndex you need is, then use this script first
Sub Find()
Dim colorIndexFinder As Integer
colorIndexFinder = Range("A1").Interior.colorIndex 'CHANGE A1 to the cell with the colour you want to use
MsgBox (colorIndexFinder)
End Sub
Edit
You have mentioned you do use merged cells
Please try
Sub WalkThePlank()
Dim colorIndex As Integer
colorIndex = 3 'UPDATE ME TO YOUR COLOUR OR BE FED TO THE SHARKS
Dim rng As Range
For Each rng In ActiveSheet.UsedRange.Cells
Dim color As Long
color = rng.Interior.colorIndex
If (color = colorIndex) Then
If (rng.MergeCells) Then
rng.MergeArea.Locked = True
Else
rng.Locked = True
End If
Else
If (rng.MergeCells) Then
rng.MergeArea.Locked = False
Else
rng.Locked = False
End If
End If
Next rng
End Sub