UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y0QXNcfQy+D6YGVf1IFt+/wnhP89Q1wARIv/QKixyNk='
WHERE
key_id = '80bb6f4abb5751897e5cf05ffeb1d4e85cbfdc63e42c4b5ef45c6d7ee3454b3c'
AND (
token = 'Y0QXNcfQy+D6YGVf1IFt+/wnhP89Q1wARIv/QKixyNk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)