UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4SK9JTgAoSZVNmzdpFgJaVsXityREQiGCK3rhYs0Nos='
WHERE
key_id = '86c09b96a68a42ccb190d8afd2d6301240d73ade70796a1f8caeb310ccbc70c3'
AND (
token = '4SK9JTgAoSZVNmzdpFgJaVsXityREQiGCK3rhYs0Nos='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)