UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AQl27C7x+dOkhlvcxJvkVbmMVDdozGGmZoEJmd8jq/I='
WHERE
key_id = '911b4ce66100afbff1cee5e75153ba34c5a8bef471abdd341a4c363dd05dab77'
AND (
token = 'AQl27C7x+dOkhlvcxJvkVbmMVDdozGGmZoEJmd8jq/I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)