UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MNRww+KqIJG3ZKPvFR8dNEmJwaSrC4Xkh5FpeEE8sEM='
WHERE
key_id = '7c68a90e00de3e811870a77b2ee6e520caf157c40c206bf15296e5c1c13ac69d'
AND (
token = 'MNRww+KqIJG3ZKPvFR8dNEmJwaSrC4Xkh5FpeEE8sEM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)