UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n4qeCg53JNU5Jp6m/ByGcG1MrVo3/bAxLv/vbbVxM9M='
WHERE
key_id = '00dea3ce60e930664572ffe81b89f398c6640fdcf44ad0e068f76f0e65cdc21e'
AND (
token = 'n4qeCg53JNU5Jp6m/ByGcG1MrVo3/bAxLv/vbbVxM9M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)