UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WCqrcjujzvJkxUB4QQtLLx6dLr8tBX4Px+bpRwp3htE='
WHERE
key_id = '2a2751940630ea425d535055e382810e619a1e132fe503e8be7f60aaa581ed3a'
AND (
token = 'WCqrcjujzvJkxUB4QQtLLx6dLr8tBX4Px+bpRwp3htE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)