Invalid column name 'Locked'.
The name locked is either referenced in the query being sent to SQL Server or referenced in a programmability object (e.g. trigger) being executed. I suggest you start with a trace of batch and rpc starting events to rule out the first case. The name lockedsuggests it may be used for application level concurrency so perhaps there's an ORM lay or similar injecting it.

The trace can be done using the legacy Profiler/SQL Trace or an Extended Events Trace. Below is an example XE trace that filters by application name to reduce the noise or you could run an unfiltered one on a test box.

CREATE EVENT SESSION [batch_and_rpc_completed] ON SERVER 
ADD EVENT sqlserver.rpc_starting(
    ACTION(package0.event_sequence,sqlserver.session_id)
    WHERE ([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[client_app_name],N'YourApplication'))),
ADD EVENT sqlserver.sql_batch_starting(
    ACTION(package0.event_sequence,sqlserver.session_id)
    WHERE ([sqlserver].[equal_i_sql_unicode_string]([sqlserver].[client_app_name],N'YourApplication')))
ADD TARGET package0.event_file(SET filename=N'batch_and_rpc_completed')
WITH (MAX_MEMORY=8192 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=5 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=ON,STARTUP_STATE=OFF);


EDIT:

Here's another trace that captures only error_reported events. This is a SQL 2014+ version gleaned from the Brent Ozar's SQL 2012 version of this trace @sp_BlitzErik referenced in his comment.

CREATE EVENT SESSION failed_queries ON SERVER
ADD EVENT sqlserver.error_reported(
    ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
    WHERE ([severity]&gt; 10))
ADD TARGET package0.asynchronous_file_target(SET filename = 'failed_queries' ,max_file_size = 5,max_rollover_files = 5)
WITH (MAX_DISPATCH_LATENCY = 5 SECONDS);