UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aNo/IcXwq9lC9rVG7ETXWwNmsO+zqDYRoddrfu0T698='
WHERE
key_id = '4d55d3e8006babff9d62faf290d2053f22034ac539f1cbf281c37f012f61b741'
AND (
token = 'aNo/IcXwq9lC9rVG7ETXWwNmsO+zqDYRoddrfu0T698='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)