UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IKBehe3APHw4sL8bYBEd3W+YuzxLLvjls3lzApJjPVQ='
WHERE
key_id = '32241d62f7440a5e2fb69d40e1a299193018cd4791c9fc2d1b11a0460f18af1a'
AND (
token = 'IKBehe3APHw4sL8bYBEd3W+YuzxLLvjls3lzApJjPVQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)