UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H7ZZm7SDt5Mk5//Tk7AN+iFrYzwacnLlPSmBRtWVOBk='
WHERE
key_id = '49fc11c1bfc921c2c130e05ea6e599361cbbcedf94fd7b8ae7486c8dad5eff9b'
AND (
token = 'H7ZZm7SDt5Mk5//Tk7AN+iFrYzwacnLlPSmBRtWVOBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)