To get an icon to change, use a calculation field that returns "container" as it's return type. Load your two images into two container fields or two fields of a related record related to your current table with the X operator so that the values are linked to all records.
Set up an expression in your calculation field like this:
If ( gLockField ; LockImageField ; UnLockedImageField )
Set up the calculation field on your layout as a button to perform this script:
Set Field [ YourTable::gLockField ; Not YourTable::gLockField ]
gLockField would be a global number field.
To "lock" the records, you have two basic options: On the layout, you can use OnObjectEnter Script triggers to run a script that checks the value of gLockField and uses Go To Field or Go To Object to put the cursor or focus somewhere "safe". This "locks" these fields only for the layouts where you set this up.
If you can put all four fields in a related record separate from the other data you don't want to lock, you can use gLockField for record level access controls set up in Manage | Security. This locks an entire record for all layouts in your database. To learn more on this, see "Editing Record Access Privileges" in filemaker help and scroll down to the section titled "Entering a formula for limiting access on a record-by-record basis".