UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4lpvGy/FUYDkd7DQg1yXdgZ1fyjw5RD5BFA8T+lrnFY='
WHERE
key_id = 'a43297b9aac08f7acf4d397411d2098fc3ca9d1cd781b015a36f0cdb871e865f'
AND (
token = '4lpvGy/FUYDkd7DQg1yXdgZ1fyjw5RD5BFA8T+lrnFY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)