UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4H7/fqa1fpYAZW2zND1l2ndYUJSFxi+YYq/VqzgLKBs='
WHERE
key_id = '63631dc1e8f59ba56e06f79c2f00f53bb92246ffdfec0edf8368fd1ff80acf92'
AND (
token = '4H7/fqa1fpYAZW2zND1l2ndYUJSFxi+YYq/VqzgLKBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)