UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mgFFrNbX/d7qPxeQDEJ1EC1QsCBQyTn2Vnb9e2hvoZc='
WHERE
key_id = '7d75b7a50135989b92fd4e8fd86577c015b7cac8d6c0c2d9ad4d3839dc090fc9'
AND (
token = 'mgFFrNbX/d7qPxeQDEJ1EC1QsCBQyTn2Vnb9e2hvoZc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)