UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bDo88FWK/Vv8FKCXDmJhiI+NLZMvPIlQBNk4VYvxwEc='
WHERE
key_id = '8df5393c42cab98ac4c6a76c68cb5d3130b5fbf8c1c378dd84b40f5ee450a030'
AND (
token = 'bDo88FWK/Vv8FKCXDmJhiI+NLZMvPIlQBNk4VYvxwEc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)