UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o/Dv9tHmIyNCMnsLLhO6iYJ08JlH2wxkFgvjC+vUIvw='
WHERE
key_id = '676ebc40363aabd98e579c0894571aea8001b7c02e9668bb68e1e85ce143fdec'
AND (
token = 'o/Dv9tHmIyNCMnsLLhO6iYJ08JlH2wxkFgvjC+vUIvw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)