Open the Circulation Desk, and click the 'Return' tab, next to the 'Loan' tab.
Once in the Return tab, ensure the cursor is blinking in the bar at the top and type/scan the lock's barcode like for loaning.
Press enter, then click the barcode under the 'Barcode' heading.
This will take you to the lock's entry in Oliver. From here you want to click 'Edit' at the top:
This brings you to a long list of editable variables for the entry. Scroll down to Status, and change the dropdown from 'Available' to 'Disposed'.
Click the Save icon in the top left corner.
And the lock is written off in Oliver. To write it off in real life, just place the lock in the nearest bin.