UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1GOFwf0NfcVpq5AyKFsIhWK56M+ombkCOcZd/FTwDgE='
WHERE
key_id = '035645e602139e5d5433aafa1a5fbd15df926a79e1a8aee6e7bce1ebcf3db231'
AND (
token = '1GOFwf0NfcVpq5AyKFsIhWK56M+ombkCOcZd/FTwDgE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)