def METHOD_NAME(project_id, search_id, user_id):
    with pg_client.PostgresClient() as cur:
        cur.execute(
            cur.mogrify("""\
            UPDATE public.searches 
            SET deleted_at = timezone('utc'::text, now()) 
            WHERE project_id = %(project_id)s
              AND search_id = %(search_id)s
              AND (user_id = %(user_id)s OR is_public);""",
                        {"search_id": search_id, "project_id": project_id, "user_id": user_id})
        )
    return {"state": "success"}