UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LGKy7Oq9pFtACKNSeTiIucbilvxHmxXbn/aaIQBGsnA='
WHERE
key_id = '809c6e0f1c6bb0e1b80a71211b20a5a1b421cedea7896dd64525f2379920c981'
AND (
token = 'LGKy7Oq9pFtACKNSeTiIucbilvxHmxXbn/aaIQBGsnA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)