UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'roi2r8cqjPKIeDJTmjznLUbtM5X/qUIReLr4v9usKVQ='
WHERE
key_id = '6cc976f372000dea97227194de5c1d03884bfa137570c2cf75fb9f4127945517'
AND (
token = 'roi2r8cqjPKIeDJTmjznLUbtM5X/qUIReLr4v9usKVQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)