UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1OrchXQBFmDunspfALXzY3PC8Bas+gH9fEQY4bRNThQ='
WHERE
key_id = 'e78d852e75714c62d2754fa1c2f68a3d7585f8d3fd1393feeda57607bee923cc'
AND (
token = '1OrchXQBFmDunspfALXzY3PC8Bas+gH9fEQY4bRNThQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)