UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E0M3gh1JgxwnKDQlGRhCxfTBvJIoXYD6wbM0nj/ylSc='
WHERE
key_id = 'c9c26a7ff8ab6cda949d3cf13e4b4a97f264703f815a3b14a6a110aa93955e85'
AND (
token = 'E0M3gh1JgxwnKDQlGRhCxfTBvJIoXYD6wbM0nj/ylSc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)