UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ou4ver7Hqej6fWr+I4UfQyKOuDoeo+42rjDOZy9u4Fg='
WHERE
key_id = '16b7ba2ac26785756192dee625bc8efbbdbf10d6880bc203d1abdf9a305d3763'
AND (
token = 'Ou4ver7Hqej6fWr+I4UfQyKOuDoeo+42rjDOZy9u4Fg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)