The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
chat_id
,business_group_id
,person_id
,contact_id
,login_date
,object_version_number
from ota_chat_users
where chat_id = p_chat_id
and person_id = p_person_id
and contact_id = p_contact_id;
select
chat_id
,business_group_id
,person_id
,contact_id
,login_date
,object_version_number
from ota_chat_users
where chat_id = p_chat_id
and (person_id is null or person_id = p_person_id)
and (contact_id is null or contact_id = p_contact_id)
for update nowait;